package com.team.easybuy.service;

import com.github.pagehelper.PageInfo;
import com.team.easybuy.entity.Car;
import com.team.easybuy.entity.OrderDetail;
import com.team.easybuy.entity.Product;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.xml.soap.Detail;
import java.util.List;
import java.util.Map;

public interface ProductService {

    Product selectById(Integer id);

    List<Product> selectByCId(Integer id);

    PageInfo<Product> solrById(@RequestParam Map<String, Object> params);

    PageInfo<Product> solrByName(@RequestParam Map<String, Object> params);

    List<Product> solrByCId123(Integer id);

    boolean addPro(Product product, MultipartFile file);

    boolean delPro(Integer id);

    boolean editProNoFile(Product product);

    boolean editProHasFile(Product product, MultipartFile file);

    boolean updateStock(List<Car> carList);

    void updateAddStock(List<OrderDetail> detailList);

    boolean checkNum(List<Car> carList);

}
